define(['text!js/module1/tpl.html'], function (tpl) {

    var View1 = Backbone.View.extend({
        el: '#container',

        events: {
            'click li': 'showText'
        },

        initialize: function () {
        	console.log("ss");
        },

        render: function (name) {
            this.$el.html(_.template(tpl, {name: name}));
        },

        showText: function (e) {
            var index = $(e.currentTarget).index();
            switch (index) {
            	  case 0:
            	      alert("我是大娃，力大无穷！");
            	      break;
            	  case 1:
            	      alert("我是二娃，千里眼，顺风耳！");
            	      break;
            	  case 2:
            	      alert("我是三娃，钢筋铁骨！");
            	      break;
            	  case 3:
            	      alert("我是四娃，吐火！");
            	      break;
            	  case 4:
            	      alert("我是五娃，吐水！");
            	      break;
            	  case 5:
            	      alert("我是六娃，隐身！");
            	      break;
            	  case 6:
            	      alert("我是七娃，宝葫芦！");
            	      break;
            	  default:
            	      alert("我是爷爷，最牛逼！");
            	      break;            
            }
        }
    });

    return View1;
});